Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backends/zoneinfo.py: Skip using the "Factory" timezone #115

Merged
merged 2 commits into from
Oct 4, 2023
Merged

backends/zoneinfo.py: Skip using the "Factory" timezone #115

merged 2 commits into from
Oct 4, 2023

Conversation

knobix
Copy link
Contributor

@knobix knobix commented Oct 3, 2023

Referencing the "Factory" timezone can lead to ValueError exceptions on some systems, e.g. FreeBSD, if the system zoneinfo database is used:

ValueError: Invalid STD format in b'0'

Thus drop the "Factory" timezone from the sets before iterating over them to avoid the aforementioned issue.

This should fix #114 .

knobix and others added 2 commits October 3, 2023 11:42
Referencing the "Factory" timezone can lead to ValueError exceptions on some systems, e.g. FreeBSD, if the system zoneinfo database is used:

ValueError: Invalid STD format in b'<Local time zone must be set--use tzsetup>0'

Thus drop the "Factory" timezone from the sets before iterating over them to avoid the aforementioned issue.
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c1d46ab) 98.06% compared to head (c3c5343) 98.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   98.06%   98.08%   +0.01%     
==========================================
  Files           9        9              
  Lines         207      209       +2     
==========================================
+ Hits          203      205       +2     
  Misses          4        4              
Files Coverage Δ
timezone_field/backends/zoneinfo.py 95.00% <100.00%> (+0.55%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mfogel mfogel merged commit 5f42663 into mfogel:main Oct 4, 2023
116 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using the "Factory" timezone on systems that use the system zoneinfo database can cause problems
2 participants